diff --git a/drivers/fastboot/Kconfig b/drivers/fastboot/Kconfig
index d6e2be0..b9e51bd 100644
--- a/drivers/fastboot/Kconfig
+++ b/drivers/fastboot/Kconfig
@@ -1,4 +1,5 @@
 menu "Fastboot support"
+	depends on CMDLINE
 
 config FASTBOOT
 	bool
diff --git a/drivers/fastboot/fb_command.c b/drivers/fastboot/fb_command.c
index b8782bf..f95f4e4 100644
--- a/drivers/fastboot/fb_command.c
+++ b/drivers/fastboot/fb_command.c
@@ -11,7 +11,6 @@
 #include <fastboot-internal.h>
 #include <fb_mmc.h>
 #include <fb_nand.h>
-#include <mapmem.h>
 #include <part.h>
 #include <stdlib.h>
 #include <linux/printk.h>
@@ -279,7 +278,6 @@
 {
 #define BYTES_PER_DOT	0x20000
 	u32 pre_dot_num, now_dot_num;
-	void *buf;
 
 	if (fastboot_data_len == 0 ||
 	    (fastboot_bytes_received + fastboot_data_len) >
@@ -289,10 +287,8 @@
 		return;
 	}
 	/* Download data to fastboot_buf_addr */
-	buf = map_sysmem(fastboot_buf_addr, 0);
-	memcpy(buf + fastboot_bytes_received,
+	memcpy(fastboot_buf_addr + fastboot_bytes_received,
 	       fastboot_data, fastboot_data_len);
-	unmap_sysmem(buf);
 
 	pre_dot_num = fastboot_bytes_received / BYTES_PER_DOT;
 	fastboot_bytes_received += fastboot_data_len;
@@ -335,16 +331,13 @@
  */
 static void __maybe_unused flash(char *cmd_parameter, char *response)
 {
-	void *buf = map_sysmem(fastboot_buf_addr, 0);
-
 	if (IS_ENABLED(CONFIG_FASTBOOT_FLASH_MMC))
-		fastboot_mmc_flash_write(cmd_parameter, buf, image_size,
-					 response);
+		fastboot_mmc_flash_write(cmd_parameter, fastboot_buf_addr,
+					 image_size, response);
 
 	if (IS_ENABLED(CONFIG_FASTBOOT_FLASH_NAND))
-		fastboot_nand_flash_write(cmd_parameter, buf, image_size,
-					  response);
-	unmap_sysmem(buf);
+		fastboot_nand_flash_write(cmd_parameter, fastboot_buf_addr,
+					  image_size, response);
 }
 
 /**
diff --git a/drivers/fastboot/fb_common.c b/drivers/fastboot/fb_common.c
index 5959545..3576b06 100644
--- a/drivers/fastboot/fb_common.c
+++ b/drivers/fastboot/fb_common.c
@@ -11,7 +11,6 @@
  */
 
 #include <bcb.h>
-#include <bootm.h>
 #include <common.h>
 #include <command.h>
 #include <env.h>
@@ -21,7 +20,7 @@
 /**
  * fastboot_buf_addr - base address of the fastboot download buffer
  */
-ulong fastboot_buf_addr;
+void *fastboot_buf_addr;
 
 /**
  * fastboot_buf_size - size of the fastboot download buffer
@@ -143,19 +142,22 @@
  */
 void fastboot_boot(void)
 {
-	char *s = NULL;
+	char *s;
 
-	if (IS_ENABLED(CONFIG_CMDLINE)) {
-		s = env_get("fastboot_bootcmd");
-		if (s)
-			run_command(s, CMD_FLAG_ENV);
-	}
+	s = env_get("fastboot_bootcmd");
+	if (s) {
+		run_command(s, CMD_FLAG_ENV);
+	} else if (IS_ENABLED(CONFIG_CMD_BOOTM)) {
+		static char boot_addr_start[20];
+		static char *const bootm_args[] = {
+			"bootm", boot_addr_start, NULL
+		};
 
-	if (!s && IS_ENABLED(CONFIG_BOOTM)) {
-		int ret;
+		snprintf(boot_addr_start, sizeof(boot_addr_start) - 1,
+			 "0x%p", fastboot_buf_addr);
+		printf("Booting kernel at %s...\n\n\n", boot_addr_start);
 
-		printf("Booting kernel at %lx...\n\n\n", fastboot_buf_addr);
-		ret = bootm_boot_start(fastboot_buf_addr, NULL);
+		do_bootm(NULL, 0, 2, bootm_args);
 
 		/*
 		 * This only happens if image is somehow faulty so we start
@@ -212,9 +214,16 @@
 	fastboot_progress_callback = progress;
 }
 
-void fastboot_init(ulong buf_addr, u32 buf_size)
+/*
+ * fastboot_init() - initialise new fastboot protocol session
+ *
+ * @buf_addr: Pointer to download buffer, or NULL for default
+ * @buf_size: Size of download buffer, or zero for default
+ */
+void fastboot_init(void *buf_addr, u32 buf_size)
 {
-	fastboot_buf_addr = buf_addr ? buf_addr : CONFIG_FASTBOOT_BUF_ADDR;
+	fastboot_buf_addr = buf_addr ? buf_addr :
+				       (void *)CONFIG_FASTBOOT_BUF_ADDR;
 	fastboot_buf_size = buf_size ? buf_size : CONFIG_FASTBOOT_BUF_SIZE;
 	fastboot_set_progress_callback(NULL);
 }
